The example below uses the following boundary conditions to demonstrate how the Jacobi iteration works:
$u(0,y) = 1$
$u(1,y) = 1$
$u(x,0) = 1$
$u(x,1) = 1$
As the number of iterations increases, the boundary conditions are propogated through the solution, then the solution converges towards its steady state.
Use the slider to see this effect.
Effect of Mesh Spacing
Now, we use the following boundary conditions to look at the effect of mesh spacing: